from numpy import matrix
from scipy.linalg import inv, det, eig

def logistic(a):
  return lambda x: a * x * (1 - x)


def main():
	A=matrix([[-4,1,1,0],[1,-4,0,1],[1,0,-4,1],[0,1,1,-4]])
	b = matrix([-.25,-.25,-.25,-.25]).transpose()
	print det(A)
	print inv(A)*b
main()